<!-- 页头 -->
<page-header-wrapper [logo]="logo" [content]="content" [title]="'企业详情'" [ngClass]="{'affix': scrollTop>210}">
  <ng-template #logo>
    <button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
      <i nz-icon nzType="left" nzTheme="outline"></i>
    </button>
  </ng-template>
  <ng-template #content>
    <nz-skeleton [nzLoading]="service.http.loading">
      <div class="user-info" nz-row>
        <div nz-col [nzXl]="18" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="d-flex">
          <img [src]="detailData?.enterpriseLogo" />
          <div style="flex: 1;">
            <div nz-row>
              <div nz-col [nzLg]="12" [nzSm]="24" [nzXs]="24">
                <p style="margin-bottom: 0;word-break:break-all">{{ detailData?.enterpriseName }}</p>
              </div>
              <div nz-col [nzLg]="12" [nzSm]="24" [nzXs]="24">
                <nz-badge nzStatus="success" nzText="正常" *ngIf="!detailData?.stateLocked"></nz-badge>
                <nz-badge nzStatus="error" nzText="冻结" *ngIf="detailData?.stateLocked"></nz-badge>
              </div>
            </div>
            <div nz-row>
              <div nz-col [nzLg]="12" [nzSm]="24" [nzXs]="24">
                <p>{{ detailData?.unifiedSocialCreditCode }}</p>
              </div>
              <div nz-col [nzLg]="12" [nzSm]="24" [nzXs]="24">
                认证时间：{{detailData?.createTime}}
              </div>
            </div>
            <div>
              服务评级：
              <ng-container *ngIf="billEvaluate!==null; else billEvaluateelseTemplate">
                <nz-rate [ngModel]="billEvaluate" nzDisabled></nz-rate>
              </ng-container>
              <ng-template #billEvaluateelseTemplate>
                暂无评价
              </ng-template>
            </div>
          </div>
        </div>
        <div nz-col [nzXl]="6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right mt-sm">
          <ng-container *ngIf="isEdit;else editButton">
            <button [disabled]="false" nz-button (click)="reset()">
              取消
            </button>
            <button [disabled]="false" nz-button nzDanger (click)="save({})">
              保存
            </button>
            <button [disabled]="false" nz-button nzDanger (click)="auditPass(true)"
              *ngIf="detailData?.approvalStatus===10" acl
              [acl-ability]="['USERCENTER-FREIGHT-LIST-DETAIL-pass','USERCENTER-FREIGHT-ENTERPRISE-D-audit']">
              通过
            </button>
          </ng-container>
          <ng-template #editButton>
            <ng-container *ngIf="detailData?.approvalStatus===10">
              <button [disabled]="false" nz-button nzDanger (click)="auditPass(false)" acl
                [acl-ability]="['USERCENTER-FREIGHT-LIST-DETAIL-pass','USERCENTER-FREIGHT-ENTERPRISE-D-audit']">
                通过
              </button>
              <button [disabled]="false" nz-button nzDanger (click)="auditNo()" acl
                [acl-ability]="['USERCENTER-FREIGHT-LIST-DETAIL-pass','USERCENTER-FREIGHT-ENTERPRISE-D-audit']">
                驳回
              </button>
            </ng-container>
            <ng-container *ngIf="detailData?.approvalStatus!=10">
              <button [disabled]="false" nz-button nzDanger nz-popconfirm [nzPopconfirmTitle]="enable"
                (nzOnConfirm)="freezeOrResume(0)" nzPopconfirmPlacement="bottomRight" *ngIf="detailData?.stateLocked"
                acl [acl-ability]="['USERCENTER-FREIGHT-LIST-DETAIL-lock','USERCENTER-FREIGHT-ENTERPRISE-D-lock']">
                启用
              </button>
              <button [disabled]="false" nz-button nzDanger nz-popconfirm [nzPopconfirmTitle]="frozen"
                (nzOnConfirm)="freezeOrResume(1)" nzPopconfirmPlacement="bottomRight" *ngIf="!detailData?.stateLocked"
                acl [acl-ability]="['USERCENTER-FREIGHT-LIST-DETAIL-lock','USERCENTER-FREIGHT-ENTERPRISE-D-lock']">
                冻结
              </button>
              <button [disabled]="false" nz-button nzDanger nz-popconfirm [nzPopconfirmTitle]="Payfrozen"
                (nzOnConfirm)="PayOrResume(0)" nzPopconfirmPlacement="bottomRight" *ngIf="detailData?.createPay === 1">
                开通支付权限
              </button>
              <button [disabled]="false" nz-button nzDanger nz-popconfirm [nzPopconfirmTitle]="Payenable"
                (nzOnConfirm)="PayOrResume(1)" nzPopconfirmPlacement="bottomRight" *ngIf="detailData?.createPay === 0">
                关闭支付权限
              </button>
            </ng-container>
            <button [disabled]="false" nz-button nzDanger (click)="ratify()" acl
              [acl-ability]="['USERCENTER-FREIGHT-LIST-DETAIL-save','USERCENTER-FREIGHT-ENTERPRISE-D-save']">
              修改
            </button>
          </ng-template>
        </div>
      </div>
    </nz-skeleton>
  </ng-template>

  <ng-template #frozen>
    <ng-container
      *ngTemplateOutlet="PopconfirmTempalte;context:{title:'确定冻结该企业吗？',content:'停用后，该企业将被限制使用，不限于访问受限、无法发布货源等，请谨慎操作'}">
    </ng-container>
  </ng-template>
  <ng-template #enable>
    <ng-container *ngTemplateOutlet="PopconfirmTempalte;context:{title:'确定启用该企业吗？',content:'启用后，该企业将恢复正常使用功能，请再次确认'}">
    </ng-container>
  </ng-template>
  <ng-template #Payenable>
    <ng-container
      *ngTemplateOutlet="PopconfirmTempalte;context:{title:'确定关闭该企业支付权限吗？',content:'停用后，该企业将被限制使用支付功能，请谨慎操作'}">
    </ng-container>
  </ng-template>
  <ng-template #Payfrozen>
    <ng-container
      *ngTemplateOutlet="PopconfirmTempalte;context:{title:'确定开通该企业支付权限吗？',content:'启用后，该企业将恢复正常支付功能，请再次确认'}">
    </ng-container>
  </ng-template>
</page-header-wrapper>

<nz-card [class]="isEdit?'edit-box':'readOnly-box'" [nzBorderless]="true">
  <div class="mb-md">
    <div class="font-weight-blod text-md detail-title">
      <a class="sign"></a>
      <span class="mr-xs">企业基本信息</span>
      <label *ngIf="detailData?.approvalStatus===10" style="color: #1890ff;"><i nz-icon nzType="info-circle"
          nzTheme="fill" class="mr-xs"></i>待审核
      </label>
      <label *ngIf="detailData?.approvalStatus===20" style="color: #52c41a;"><i nz-icon nzType="check-circle"
          nzTheme="fill" class="mr-xs"></i>审核通过
      </label>
      <label *ngIf="detailData?.approvalStatus===30" style="color: #ff4d4f;"><i nz-icon nzType="close-circle"
          nzTheme="fill" class="mr-xs"></i>驳回&nbsp;驳回原因:{{detailData?.approvalOpinion}}
      </label>
      <label *ngIf="detailData?.isExpired" style="color: #fa8c16;">
        <i nz-icon nzType="info-circle" nzTheme="fill" class="ml-md mr-xs"></i>企业营业期限已过期
      </label>
    </div>

    <sv-container col="2" class="mt16">
      <sv-title>
        <!-- <label class="mr-md">企业基本信息</label>
      <label *ngIf="detailData?.approvalStatus===10" style="color: #1890ff;"><i nz-icon nzType="info-circle"
          nzTheme="fill" class="mr-xs"></i>待审核
      </label>
      <label *ngIf="detailData?.approvalStatus===20" style="color: #52c41a;"><i nz-icon nzType="check-circle"
          nzTheme="fill" class="mr-xs"></i>审核通过
      </label>
      <label *ngIf="detailData?.approvalStatus===30" style="color: #ff4d4f;"><i nz-icon nzType="close-circle"
          nzTheme="fill" class="mr-xs"></i>驳回&nbsp;驳回原因:{{detailData?.approvalOpinion}}
      </label>
      <label *ngIf="detailData?.isExpired" style="color: #fa8c16;">
        <i nz-icon nzType="info-circle" nzTheme="fill" class="ml-md mr-xs"></i>企业营业期限已过期
      </label> -->
        <p style="margin-bottom: 0;">
          四要素验证：
          <label *ngIf="detailData?.esignCheckStatus===0" style="color: #ff4d4f;"><i nz-icon nzType="info-circle"
              nzTheme="fill" class="mr-xs"></i>不通过&nbsp;&nbsp;驳回原因:{{detailData?.esignCheckMsg}}
          </label>
          <label *ngIf="detailData?.esignCheckStatus===1" style="color: #52c41a;"><i nz-icon nzType="check-circle"
              nzTheme="fill" class="mr-xs"></i>通过
          </label>
          <label *ngIf="detailData?.esignCheckStatus===2" style="color:  #1890ff;"><i nz-icon nzType="close-circle"
              nzTheme="fill" class="mr-xs"></i>未认证：&nbsp;&nbsp;{{detailData?.esignCheckMsg}}
          </label>
        </p>
      </sv-title>
      <sv label="公司名称">
        <ng-container *ngIf="isEdit; else enterpriseNameelseTemplate">
          <input nz-input type="text" [(ngModel)]="detailData.enterpriseName" [readonly]="!isEdit"
            [nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
        </ng-container>
        <ng-template #enterpriseNameelseTemplate>
          <span style="word-break:break-all ">{{detailData.enterpriseName}}</span>
        </ng-template>
      </sv>
      <sv label="统一社会信用代码">
        <ng-container *ngIf="isEdit; else unifiedSocialCreditCodeelseTemplate">
          <input nz-input type="text" [(ngModel)]="detailData.unifiedSocialCreditCode" [readonly]="!isEdit"
            [nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
        </ng-container>
        <ng-template #unifiedSocialCreditCodeelseTemplate>
          {{detailData.unifiedSocialCreditCode}}
        </ng-template>
      </sv>
      <sv label="公司类型">
        <!-- <input nz-input type="text" [(ngModel)]="detailData.enterpriseType" [readonly]="!isEdit" [nzBorderless]="!isEdit"
        [placeholder]="isEdit?'':'-'"> -->
        <nz-select [nzMaxTagCount]="3" nzPlaceHolder="请选择" [(ngModel)]="detailData.enterpriseType"
          [nzPlaceHolder]="isEdit?'':'-'" [nzBorderless]="!isEdit" [nzShowArrow]="isEdit" [nzDisabled]="!isEdit">
          <nz-option nzLabel="物流企业" [nzValue]="1"></nz-option>
          <nz-option nzLabel="货运代理" [nzValue]="2"></nz-option>
          <nz-option nzLabel="生产型企业" [nzValue]="3"></nz-option>
          <nz-option nzLabel="贸易类企业" [nzValue]="4"></nz-option>
          <nz-option nzLabel="科技型企业" [nzValue]="5"></nz-option>
          <nz-option nzLabel="化学化工企业" [nzValue]="6"></nz-option>
          <nz-option nzLabel="其他" [nzValue]="7"></nz-option>
        </nz-select>
      </sv>
      <sv label="注册资本">
        <ng-container *ngIf="isEdit; else registrationCapitalTemplate">
          <input nz-input type="text" [(ngModel)]="detailData.registrationCapital" [readonly]="!isEdit"
            [nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'" class="mr-sm">
        </ng-container>
        <ng-template #registrationCapitalTemplate>
          {{detailData?.registrationCapital}}
        </ng-template>
        <span *ngIf="detailData?.registrationCapital">万元</span>
      </sv>
      <sv label="成立日期">
        <nz-date-picker [(ngModel)]="detailData.enterpriseRegistrationTime" [nzDisabled]="!isEdit"
          [nzPlaceHolder]="isEdit?'':'-'" [nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''">
        </nz-date-picker>
      </sv>
      <sv label="营业期限">
        <nz-date-picker [(ngModel)]="detailData.operatingStartTime" [nzDisabled]="!isEdit" nzPlaceHolder=" "
          [nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''" style="width: 110px;" class="calendar">
        </nz-date-picker>
        -
        <ng-container *ngIf="!isEdit && !detailData?.operatingEndTime && detailData?.operatingStartTime">
          <label style="padding-left: 11px;">长期</label>
        </ng-container>
        <nz-date-picker [(ngModel)]="detailData.operatingEndTime" [nzDisabled]="!isEdit" nzPlaceHolder=" "
          [nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''" style="width: 110px;" class="calendar">
        </nz-date-picker>
        <ng-container *ngIf="isEdit">
          <label nz-checkbox [ngModel]="!!!detailData.operatingEndTime"
            (ngModelChange)="$event?detailData.operatingEndTime='':''" class="ml-sm">长期</label>
        </ng-container>
      </sv>
      <sv label="常用服务">
        <ng-container *ngIf="isEdit; else oftenUsedServiceselseTemplate">
          <nz-select [(ngModel)]="detailData.oftenUsedServices">
            <nz-option [nzValue]="10" nzLabel="整车发货"></nz-option>
            <nz-option [nzValue]="20" nzLabel="大宗发货"></nz-option>
          </nz-select>
        </ng-container>
        <ng-template #oftenUsedServiceselseTemplate>
          <input nz-input type="text"
            [ngModel]="detailData.oftenUsedServices?detailData.oftenUsedServices===10?'整车发货':'大宗发货':'-'"
            [readonly]="!isEdit" [nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
        </ng-template>
      </sv>
      <sv label="公司所在地" col="3">
        <ng-container *ngIf="isEdit; else cascaderelseTemplate">
          <nz-cascader [(ngModel)]="enterpriseAddressCode" [nzLoadData]="loadRegionData">
          </nz-cascader>
        </ng-container>
        <ng-template #cascaderelseTemplate>
          {{ detailData?.fullRegionVO?.provinceName }}{{ detailData?.fullRegionVO?.cityName }}{{
          detailData?.fullRegionVO?.areaName }}
        </ng-template>
      </sv>
      <sv label="公司详细地址" col="2">
        <ng-container *ngIf="isEdit; else enterpriseAddresselseTemplate">
          <input nz-input type="text" [(ngModel)]="detailData.enterpriseAddress" [readonly]="!isEdit"
            [nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
        </ng-container>
        <ng-template #enterpriseAddresselseTemplate>
          <span style="word-break:break-all "> {{ detailData?.fullRegionVO?.provinceName }}{{
            detailData?.fullRegionVO?.cityName }}{{
            detailData?.fullRegionVO?.areaName }}{{detailData.enterpriseAddress}}</span>
        </ng-template>
      </sv>
      <sv label="经营范围" col="1">
        <ng-container *ngIf="isEdit; else businessScopeelseTemplate">
          <input nz-input type="text" [(ngModel)]="detailData.businessScope" [readonly]="!isEdit"
            [nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
        </ng-container>
        <ng-template #businessScopeelseTemplate>
          <span style="word-break:break-all ">{{detailData.businessScope}}</span>
        </ng-template>
      </sv>
      <sv label="税务机关" col="3">
        <input nz-input type="text" [(ngModel)]="detailData.taxAuthority" [readonly]="!isEdit" [nzBorderless]="!isEdit"
          [placeholder]="isEdit?'':'-'">
      </sv>
      <sv label="营业执照" col="3">
        <ng-container
          *ngTemplateOutlet="uploadTemplate;context:{data:detailData,status:isEdit,key:'licensePhotoWatermark',key2:'licensePhoto',hover:'detailPhoto'}">
        </ng-container>
      </sv>
      <sv label="企业授权函" col="3">
        <ng-container
          *ngTemplateOutlet="uploadTemplate;context:{data:detailData,status:isEdit,key:'creditPhotoWatermark',key2:'creditPhoto',hover:'adminPhoto'}">
        </ng-container>
      </sv>
    </sv-container>
  </div>
  <div class="mb-md">
    <div class="font-weight-blod text-md detail-title">
      <a class="sign"></a>
      <span>法人信息</span>
      <label *ngIf="detailData?.legalPersonIdentityVO?.isExpired" style="color: #fa8c16;">
        <i nz-icon nzType="info-circle" nzTheme="fill" class="ml-md mr-xs"></i>法人身份证期限已过期
      </label>
    </div>
    <sv-container col="3" class="mt16">
      <!-- <sv-title>法人信息
      <label *ngIf="detailData?.legalPersonIdentityVO?.isExpired" style="color: #fa8c16;">
        <i nz-icon nzType="info-circle" nzTheme="fill" class="ml-md mr-xs"></i>法人身份证期限已过期
      </label>
    </sv-title> -->
      <sv label="法定代表人">
        <input nz-input type="text" maxlength="32" [(ngModel)]="detailData.legalPersonIdentityVO.name"
          [readonly]="!isEdit" [nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
      </sv>
      <sv label="身份证号码">
        <input nz-input type="text" [(ngModel)]="detailData.legalPersonIdentityVO.certificateNumber"
          [readonly]="!isEdit" [nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
      </sv>
      <sv label="身份证有效期" col="1">
        <nz-date-picker [(ngModel)]="detailData.legalPersonIdentityVO.validStartTime" [nzDisabled]="!isEdit"
          nzPlaceHolder=" " [nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''" style="width: 120px;"
          class="calendar"></nz-date-picker>
        -
        <ng-container
          *ngIf="!isEdit && !detailData?.legalPersonIdentityVO?.validEndTime && detailData.legalPersonIdentityVO.validStartTime">
          <label style="padding-left: 11px;">长期</label>
        </ng-container>
        <nz-date-picker [(ngModel)]="detailData.legalPersonIdentityVO.validEndTime" [nzDisabled]="!isEdit"
          nzPlaceHolder=" " [nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''" style="width: 120px;"
          class="calendar"></nz-date-picker>
        <ng-container *ngIf="isEdit">
          <label nz-checkbox [ngModel]="!!!detailData.legalPersonIdentityVO.validEndTime"
            (ngModelChange)="$event?detailData.legalPersonIdentityVO.validEndTime='':''" class="ml-sm">长期</label>
        </ng-container>
      </sv>
      <sv label="身份证照" col="1">
        <div class="d-flex">
          <ng-container
            *ngTemplateOutlet="uploadTemplate;context:{data:detailData?.legalPersonIdentityVO,status:isEdit,key:'certificatePhotoFrontWatermark',key2:'certificatePhotoFront',hover:'legalFront'}">
          </ng-container>
          <ng-container
            *ngTemplateOutlet="uploadTemplate;context:{data:detailData?.legalPersonIdentityVO,status:isEdit,key:'certificatePhotoBackWatermark',key2:'certificatePhotoBack',hover:'legalBack'}">
          </ng-container>
        </div>
      </sv>
    </sv-container>
  </div>
  <div class="mb-md">
    <div class="font-weight-blod text-md detail-title">
      <a class="sign"></a>
      <span>企业管理员信息</span>
      <label *ngIf="detailData?.adminUserInfo?.isExpired" style="color: #fa8c16;">
        <i nz-icon nzType="info-circle" nzTheme="fill" class="ml-md mr-xs"></i>企业营业期限已过期
      </label>
    </div>
    <sv-container col="3">
      <!-- <sv-title>企业管理员信息
      <label *ngIf="detailData?.adminUserInfo?.isExpired" style="color: #fa8c16;">
        <i nz-icon nzType="info-circle" nzTheme="fill" class="ml-md mr-xs"></i>企业营业期限已过期
      </label>
    </sv-title> -->
      <sv label="姓名">
        <input nz-input type="text" [(ngModel)]="detailData.adminUserInfo.name" [readonly]="!isEdit"
          [nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
      </sv>
      <sv label="手机号">
        {{detailData.adminUserInfo?.mobile}}
      </sv>
      <sv label="身份证号">
        <input nz-input type="text" [(ngModel)]="detailData.adminUserInfo.certificateNumber" [readonly]="!isEdit"
          [nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
      </sv>
      <sv label="身份证照" col="2">
        <div class="d-flex">
          <ng-container
            *ngTemplateOutlet="uploadTemplate;context:{data:detailData?.adminUserInfo,status:isEdit,key:'certificatePhotoFrontWatermark',key2:'certificatePhotoFront',hover:'certificateBackFront'}">
          </ng-container>
          <ng-container
            *ngTemplateOutlet="uploadTemplate;context:{data:detailData?.adminUserInfo,status:isEdit,key:'certificatePhotoBackWatermark',key2:'certificatePhotoBack',hover:'certificateBack'}">
          </ng-container>
        </div>
      </sv>
    </sv-container>
  </div>
  <div class="mb-md">
    <div class="font-weight-blod text-md detail-title">
      <a class="sign"></a>
      <span>企业开票信息</span>
    </div>
    <sv-container col="3" class="mt16">
      <!-- <sv-title>企业开票信息</sv-title> -->
      <sv label="开户银行">
        <ng-container *ngIf="isEdit; else createBankTemplate">
          <input nz-input type="text" [(ngModel)]="detailData.createBank" [readonly]="!isEdit" [nzBorderless]="!isEdit"
            [placeholder]="isEdit?'':'-'">
        </ng-container>
        <ng-template #createBankTemplate>
          {{detailData.createBank}}
        </ng-template>
      </sv>
      <sv label="银行账户">
        <input nz-input type="text" [(ngModel)]="detailData.bankAccount" [readonly]="!isEdit" [nzBorderless]="!isEdit"
          [placeholder]="isEdit?'':'-'">
      </sv>
      <sv label="注册电话">
        <input nz-input type="text" [(ngModel)]="detailData.registerPhone" [readonly]="!isEdit" [nzBorderless]="!isEdit"
          [placeholder]="isEdit?'':'-'">
      </sv>
      <sv label="注册地址">
        <ng-container *ngIf="isEdit; else registerAddressTemplate">
          <input nz-input type="text" [(ngModel)]="detailData.registerAddress" [readonly]="!isEdit"
            [nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
        </ng-container>
        <ng-template #registerAddressTemplate>
          {{detailData.registerAddress}}
        </ng-template>
      </sv>
    </sv-container>
  </div>
  <div class="mb-md">
    <div class="font-weight-blod text-md detail-title">
      <a class="sign"></a>
      <span>服务评级</span>
      <ng-container *ngIf="billEvaluateList?.length===0">(暂无评级)</ng-container>
    </div>
    <sv-container col="3" class="mt-md">
      <!-- <sv-title>服务评级
      <ng-container *ngIf="billEvaluateList?.length===0">(暂无评级)</ng-container>
    </sv-title> -->
      <sv [label]="item.evaluateTypeLabel" *ngFor="let item of billEvaluateList">
        <nz-rate [ngModel]="item.evaluateFraction" nzDisabled></nz-rate>
      </sv>
    </sv-container>
  </div>
  <nz-divider></nz-divider>
  <sv-container col="3" class="mt16">
    <sv-title>合伙人信息</sv-title>
    <sv label="合伙人名称">
      {{partnerInfo.partnerContactName}}
    </sv>
    <sv label="手机号">
      <input nz-input type="text" [(ngModel)]="partnerInfo.partnerContactMobile" [readonly]="!isEdit"
        [nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
    </sv>
    <sv label="管理员">

    </sv>
    <sv label="绑定时间">
      <input nz-input type="text" [(ngModel)]="partnerInfo.enterprisePartnerRelTime" [readonly]="!isEdit"
        [nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
    </sv>
    <sv label="结算时间段">
      <input nz-input type="text" [(ngModel)]="partnerInfo.settStartTime" [readonly]="!isEdit" [nzBorderless]="!isEdit"
        [placeholder]="isEdit?'':'-'">
    </sv>
  </sv-container>
  <nz-divider></nz-divider>
  <sv-container col="3" class="mt16">
    <sv-title>渠道销售信息</sv-title>
    <sv label="姓名">
      <input nz-input type="text" [(ngModel)]="partnerInfo.channelName" [readonly]="!isEdit" [nzBorderless]="!isEdit"
        [placeholder]="isEdit?'':'-'">
    </sv>
    <sv label="手机号">
      <input nz-input type="text" [(ngModel)]="partnerInfo.channelMobile" [readonly]="!isEdit" [nzBorderless]="!isEdit"
        [placeholder]="isEdit?'':'-'">
    </sv>
    <sv label="绑定时间">
      <input nz-input type="text" [(ngModel)]="partnerInfo.enterpriseChannelRelTime" [readonly]="!isEdit"
        [nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
    </sv>
  </sv-container>
</nz-card>
<nz-card>
  <nz-tabset>
    <nz-tab nzTitle="修改合伙人记录">
      <st #st [data]="service.$api_findEnterpricePartnerRelLog" [columns]="columns"
        [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParamsCar }"
        [res]="{ reName: { list: 'data'} }" [page]="{ show: true, showSize: true, pageSizes: [20, 50, 100] }"
        [loading]="service.http.loading">
        <ng-template st-row="remark" let-item let-index="index">
          <span *ngIf="item.remark" class="overflowText" nz-tooltip [nzTooltipTitle]="item.remark">{{ item.remark
            }}</span>
          <span *ngIf="item.remark === null">--</span>
        </ng-template>
      </st>
    </nz-tab>
    <nz-tab nzTitle="修改渠道销售记录">
      <st #st1 multiSort bordered [columns]="recordColumns" [ps]="20" [data]="service.$api_findEnterpriceChannelRelLog"
        [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
        [res]="{ reName: { list: 'data', total: 'data' } }"
        [page]="{ show: true, showSize: true, pageSizes: [20, 50, 100] }" [loading]="service.http.loading">
        <ng-template st-row="remark" let-item let-index="index">
          <span *ngIf="item.remark" class="overflowText" nz-tooltip [nzTooltipTitle]="item.remark">{{ item.remark
            }}</span>
          <span *ngIf="item.remark === null">--</span>
        </ng-template>
      </st>
    </nz-tab>
  </nz-tabset>
</nz-card> 
<ng-template #PopconfirmTempalte let-title="title" let-content="content">
  <div class="ant-popover-message">
    <i nz-icon nzType="info-circle" nzTheme="fill"></i>
    <div class="ant-popover-message-title ng-star-inserted self-ant-popover-title" style="font-size: 16px">{{title}}
    </div>
    <div class="ant-popover-message-title ng-star-inserted">
      {{content}}
    </div>
  </div>
</ng-template>

<ng-template #approvedModal>
  <div nz-row nzGutter="8">
    <div nz-col nzSpan="24" se-container [labelWidth]="120">
      <se [col]="1" label="公司名称">
        {{ detailData?.enterpriseName }}
      </se>
      <se [col]="1" label="网络货运人" required>
        <nz-select nzPlaceHolder="请选择" [(ngModel)]="networkTransporter">
          <nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of ltdId"></nz-option>
        </nz-select>
      </se>
      <se [col]="1" label="企业角色" required>
        <nz-select nzPlaceHolder="请选择" [(ngModel)]="roleId">
          <nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of roles"></nz-option>
        </nz-select>
      </se>
      <se [col]="1" label="客服人员" required>
        <nz-select nzPlaceHolder="请选择" [(ngModel)]="customerServiceId">
          <nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of customerServices"></nz-option>
        </nz-select>
      </se>
    </div>
  </div>
</ng-template>

<ng-template #redectModal>
  <div nz-row nzGutter="8">
    <div nz-col nzSpan="24" se-container [labelWidth]="120">
      <se [col]="1" label="公司名称">
        {{ detailData?.enterpriseName }}
      </se>
      <se [col]="1" label="备注" required>
        <textarea nz-input rows="3" style="width: 325px;margin-left: 14px;" [(ngModel)]="approvalOpinion"></textarea>
      </se>
    </div>
  </div>
</ng-template>

<ng-template #uploadTemplate let-data="data" let-status="status" let-key="key" let-key2="key2" let-hover="hover">
  <nz-upload class="avatar-uploader" [nzAction]="uploadURl" nzName="multipartFile" nzListType="picture-card"
    [nzShowUploadList]="false" nzFileType="image/png,image/jpeg,image/jpg,image/gif"
    [nzDisabled]="!isEdit || disabledUpload" (nzChange)="changeUpload($event,data,key,key2,hover)">
    <ng-container *ngIf="!data[key] && isEdit">
      <i class="upload-icon" nz-icon [nzType]="false ? 'loading' : 'plus'"></i>
      <div class="ant-upload-text">上传</div>
    </ng-container>
    <div *ngIf="data[key]" (mouseover)="detailData[hover]=true" (mouseleave)="detailData[hover]=false"
      (click)="$event.cancelBubble=true" class="image-hover">
      <img [src]="data[key]" style="width: 200px;height: 160px;" (click)="service.showImg(data[key])" />
      <div class="mask" *ngIf="detailData[hover] && isEdit"></div>
      <div class="mask-over" *ngIf="detailData[hover] && isEdit">
        <i nz-icon nzType="close-circle" nzTheme="fill" class="delete-icon" (click)="deleteImg(data,key,key2)"></i>
        <div style="display: flex;align-items: center;">
          <i nz-icon nzType="eye" nzTheme="fill" class="show-icon" (click)="service.showImg(data[key])"></i>
        </div>
      </div>
    </div>
  </nz-upload>
</ng-template>